/*
 * Copyright (c) 2025 Industrial Software Feature Database
 */
package com.comac.ins.isfd.service;

import com.comac.ins.common.mybatis.core.page.TableDataInfo;
import com.comac.ins.isfd.domain.bo.IsfdMeshModelBatchDownLoadBo;
import com.comac.ins.isfd.domain.bo.IsfdMeshModelSearchBo;
import com.comac.ins.isfd.domain.bo.IsfdMeshQueryBo;
import com.comac.ins.isfd.domain.vo.IsfdDownLoadVo;
import com.comac.ins.isfd.domain.vo.IsfdMeshModelSearchShowVo;
import com.comac.ins.isfd.domain.vo.IsfdMeshModelStructureDefinitionTreeNodeVo;
import com.comac.ins.isfd.domain.vo.IsfdModelManagementRenderingResultVo;
import com.comac.ins.isfd.util.bdfparser.entities.bdf.BDFEntityShowVo;
import jakarta.servlet.http.HttpServletResponse;
import org.bson.Document;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 自然网格模型service
 *
 * @author lj
 * @date 2025-01-15
 */
public interface IIsfdMeshModelService {

    /**
     * 自然网格模型左侧树查询
     */
    List<IsfdMeshModelStructureDefinitionTreeNodeVo> tree(String sectionName);

    /**
     * 查询自然网格模型列表
     */
    TableDataInfo<Document> queryList(IsfdMeshQueryBo query);

    /**
     * 自然网格模型文件预览
     */
    BDFEntityShowVo getBDFPreview(String id);

    /**
     * 自然网格模型文件内容搜寻
     */
    IsfdMeshModelSearchShowVo searchBDFContent(IsfdMeshModelSearchBo bo);

    /**
     * 下载
     */
    void download(String id, HttpServletResponse response);

    /**
     * 获取下载文件的信息
     */
    IsfdDownLoadVo downloadDetail(String id);

    /**
     * 下载，如果是索引文件需要生成zip包
     */
    void newDownload(String id, HttpServletResponse response);


    /**
     * 批量下载
     */
    void batchDownload(List<String> ids, HttpServletResponse response);

    /**
     * 自然网格模型-批量文件下载
     * 可设置zip包名称
     */
    void batchDownloadWithName(IsfdMeshModelBatchDownLoadBo isfdMeshModelBatchDownLoadBo, HttpServletResponse response);

    /**
     * 自然网格模型-删除
     */

    Boolean deleteWithValidById(String id);


    /**
     * 自然网格模型-重新上传
     */
    Boolean reUpload(MultipartFile file, String id);


    /**
     * 模型渲染
     */
    IsfdModelManagementRenderingResultVo loadModel(String id);
}
